import request from '@/utils/request'

export default {

  // 获取爬虫详情
  getCrawlerDetail(id) {
    return request.service({
      url: `/crawler/analysis/getCrawlerDetail`,
      method: 'get',
      params: {
        id
      }
    })
  },

  // 获取七日数据量
  getOption1(id, date) {
    return request.service({
      url: `/crawler/analysis/getOptionBySevenDay`,
      method: 'get',
      params: {
        id,
        date
      }
    })
  },

  // 获取24小时数据量
  getOption3(id, date) {
    return request.service({
      url: `/crawler/analysis/getOptionBy24Hour`,
      method: 'get',
      params: {
        id,
        date
      }
    })
  },

  // 获取24小时警告类名的数量，饼图
  getOption6(id, date) {
    return request.service({
      url: `/crawler/analysis/getOptionByPieClass`,
      method: 'get',
      params: {
        id,
        date
      }
    })
  },

  // 获取24小时处理状态的数量，饼图
  getOption7(id, date) {
    return request.service({
      url: `/crawler/analysis/getOptionByPieStatus`,
      method: 'get',
      params: {
        id,
        date
      }
    })
  },

  // 获取招中标爬虫列表
  listPage(page, limit, searchObj) {
    return request.service({
      url: `/crawler/analysis/listPage/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  }
}
